<?php
	include('../init.php');
	$email = $_POST['email'];
	$passw = md5($_POST['password']);
	$userInfo = $db->queryUniqueObject("SELECT * FROM hs_member WHERE m_email LIKE '$email' AND m_password LIKE '$passw'");
	
	if($userInfo->m_name==NULL OR $userInfo->m_name==''){
		$data['status'] = 'fail';
		$data['msg'] = $status_msg['login_fail'];
	}else{
		$data['status'] = 'success';
		$_SESSION['m_id'] = $userInfo->m_id;
		$_SESSION['m_name'] = $userInfo->m_name;
		$_SESSION['m_lastname'] = $userInfo->m_lastname;
		$_SESSION['m_level'] = $userInfo->m_level;
	}
	echo json_encode($data);
?>